<?php
/**
 * RAI代理
 * 
 * @version $Id: RaiProxy.php 312 2008-04-23 16:29:38Z iwind $
 * @package net.4kiki.rai.client
 * @since 0.0.3
 */
class RaiProxy {
	/**
	 * Enter description here...
	 *
	 * @var RaiClient
	 */
	private $client;
	private $serviceName;
	
	/**
	 * 构造器
	 *
	 * @param RaiClient $client 客户端
	 * @param string $serviceName 服务名
	 */
	public function __construct(RaiClient $client, $serviceName) {
		$this->client = $client;
		$this->serviceName = $serviceName;
	}
	
	/**
	 * 调用当前对象未定义方法时激活此方法
	 *
	 * @param string $methodName 方法名
	 * @param array $arguments 参数
	 * @return mixed
	 */
	public function __call($methodName, $arguments) {
		return $this->client->call($this->serviceName . "." . $methodName, $arguments);
	}
}

?>